home *** CD-ROM | disk | FTP | other *** search
/ Fritz: All Fritz / All Fritz.zip / All Fritz / FILES / DATATURE / WAMPUM42.LZH / WAMPDOC.EXE / lha / WAMPUM / README2.DOC < prev    next >
Text File  |  1990-08-11  |  3KB  |  71 lines

  1. This example demonstrates the power of WAMPUM's new multi-
  2. relational data base approach.
  3.  
  4. To start the application, do the following:
  5.  
  6.  1.  Add \WAMPUM to your DOS PATH by typing:  PATH=\WAMPUM
  7.  
  8.  2.  Set up the CLIPPER environment by typing:  SET CLIPPER=V010
  9.  
  10.  3.  Change to the sample application directory:  CD \WAMPUM\SAMPLE2
  11.  
  12.  4.  Run the WAMPUM program by typing:  WAMPUM VOODOO 
  13.  
  14.  
  15. Then choose W - WAMPUM Preformat and mark the sample report option as Y.
  16.  
  17. Then <PgDn> twice.
  18.  
  19. The files used include the following:
  20.  
  21.                     ╔════════════════════════╗
  22.                     ║         PARENT         ║
  23.                     ╟────────────────────────╢
  24.                     ║    Lastname  C    15   ║
  25.                     ║    Acctno    C    10   ║
  26.                     ║    Zip       C    5    ║
  27.                     ╚════════════════════════╝
  28.  
  29. ╔═════════════════╗     ╔═════════════════╗      ╔═══════════════╗
  30. ║      CHILD      ║     ║     ACCOUNTS    ║      ║    LOCATION   ║
  31. ╟─────────────────╢     ╟─────────────────╢      ╟───────────────╢
  32. ║Lastname  C   15 ║     ║Acctno    C    10║      ║Zip     C    5 ║
  33. ║Child     C   15 ║     ║Balance   N    10║      ║City    C    15║
  34. ║                 ║     ║Descrip   C    20║      ║State   C    2 ║
  35. ╚═════════════════╝     ╚═════════════════╝      ╚═══════════════╝
  36.  
  37. For the sample report, we have linked the three secondary data
  38. bases to the PARENT data base.  This required that an index file
  39. be created for each secondary data base which MATCHED a field in
  40. the primary data base.  For CHILD, there is a LASTNAME index.  For
  41. ACCOUNTS, there is an ACCTNO index.  And for LOCATION, there is a
  42. ZIP index.  NOTE:  The fields in the PRIMARY and SECONDARY data
  43. base MUST be of the (1) same type, (2) same length, and (3) same
  44. field name.  And the index field name must be the same as the
  45. actual field name to which it refers.
  46.  
  47. When the report is run by selecting W - WAMPUM PreFormat and
  48. marking the sample report T or Y, the report writer will
  49. automatically link to all the data bases and extract the following
  50. fields:
  51.  
  52.      LASTNAME from the PARENT data base
  53.      CHILD from the CHILD data base (based on LASTNAME link)
  54.      BALANCE from the ACCOUNTS data base (based on ACCTNO link)
  55.      CITY and STATE from LOCATION data base (based on ZIP link)
  56.  
  57. Please note: this is simply an example to show the functionality
  58. of relational data bases.  It was not intended to do meaningful
  59. work!  In the dBASE world, relational (secondary) data bases MUST bear a one-to-one relationship to the primary data base!  There-
  60. fore, in this example, if a PARENT had two or more children, the
  61. remaining children would NOT be extracted on the report.  Hence it
  62. is important to set up your files correctly.  If the purpose of
  63. your system were to track multiple children (who do NOT have
  64. multiple sets of parents, i.e. pre-nuclear), then the PRIMARY
  65. data base should be the CHILD data base.   This would mean the
  66. ACCTNO and ZIP fields would have to be added to the CHILD data
  67. base rather than the PARENT file as was the case here.
  68.  
  69. Use F -FILE SELECT and choose the WAMPUM.DBF file.  Then display
  70. record 1 which demonstrates how the actual relationships were
  71. established for this example.